package grad.nxu.recruitsystem.service.impl;

import grad.nxu.recruitsystem.mapper.AuthenticationMapper;
import grad.nxu.recruitsystem.service.AuthenticationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: HAPPY
 * @Project_name: recruitSystem
 * @Package_name: grad.nxu.recruitsystem.service
 * @Date: 2023/3/10 17:06
 * @Description:
 */
@Service
public class AuthenticationServiceImpl implements AuthenticationService {
    @Autowired
    AuthenticationMapper authenticationMapper;

    @Override
    public boolean isRegistered(String email) {
        List<String> emailList = authenticationMapper.getAllEmail();
        return emailList.contains(email);
    }
}
